package com.easylinkin.linkappapi.grid.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 网格信息表
 *
 * @author
 * @since 2024-05-15
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName("grid_info")
public class GridInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @TableField(value = "id")
    private Integer id;

    /**
     * 上级ID(作用于三级网格)
     */
    @TableField(value = "parent_id")
    private Integer parentId;

    /**
     * 网格名称
     */
    @TableField(value = "grid_name")
    private String gridName;

    /**
     * 网格层级
     */
    @TableField(value = "grid_level")
    private Integer gridLevel;

    /**
     * 二维码
     */
    @TableField(value = "qr_code")
    private String qrCode;

    /**
     * 租户id
     */
    @TableField(value = "tenant_id")
    private String tenantId;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @TableField(value = "modify_time")
    private LocalDateTime modifyTime;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private String creatorId;

    /**
     * 修改人id
     */
    @TableField(value = "modify_id")
    private String modifyId;

    /**
     * 删除标记 1未删除 0已删除
     */
    @TableField(value = "delete_state")
    @TableLogic
    private Integer deleteState;

}
